import request from '@/utils/request'
//编制单位查询审核列表
export function reviewedprogresslist(listquery) {
    return request({
        url: '/api/villageprogressreviewed/reviewedprogresslist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
//区县查询审核列表
export function examineprogresslist(listquery) {
    return request({
        url: '/api/villageprogressreviewed/examineprogresslist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
//普通村庄台账审核列表
export function tzexamineprogresslist(listquery) {
  return request({
      url: '/api/villageprogressreviewed/tzexamineprogresslist',
      method: 'post',
      headers: {
          "Content-Type": "application/json"
      },
      data: listquery
  })
}
//通过
export function reviewedexamine(id){
    return request({
        url: '/api/villageprogressreviewed/reviewedexamine',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        params:{id:id},
    })
}
//拒绝
export function setexaminemessage(data) {
    return request({
        url: '/api/villageprogressreviewed/setexaminemessage',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        params:data,
    })
}
//辖区黑名单查询
export function getlistbyuser(data) {
    return request({
        url: '/api/blacklist/getlistbyuser',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data:data,
    })
}

//村镇一体查询
export function reviewedczprogresslist(listquery) {
    return request({
        url: '/api/villageprogressreviewed/reviewedczprogresslist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}

// 村镇一体-进度登记查询 (审核后)
export function progressCZlist(listquery) {
    return request({
        url: '/api/village/progressczlist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}

//村镇一体上传
export function uploadczprogressziponereviewed(data,callback) {
    return request({
        url: '/api/villageprogressreviewed/uploadczprogressziponereviewed',
        method: 'post',
        headers: {
            "Content-Type": "multipart/form-data"
        },
        data: data,
        transformRequest: [function (formDatas) {
            return formDatas;
        }],
        onUploadProgress(progressEvent){
            if(progressEvent.lengthComputable){
                let val = (progressEvent.loaded/progressEvent.total*100).toFixed(0);
                var progress = parseInt(val);
                callback(progress)
            }
        }
    })
  }
  //区县村镇一体查询审核列表
export function examineczprogresslist(listquery) {
    return request({
        url: '/api/villageprogressreviewed/examineczprogresslist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
export function tzexamineczprogresslist(listquery) {
  return request({
      url: '/api/villageprogressreviewed/tzexamineczprogresslist',
      method: 'post',
      headers: {
          "Content-Type": "application/json"
      },
      data: listquery
  })
}
//村镇一体规划编制进度
export function progressczlistcount(listquery) {
    return request({
        url: '/api/statistical/progressczlist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
//村镇一体通过
export function reviewedczexamine(id){
    return request({
        url: '/api/villageprogressreviewed/reviewedczexamine',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        params:{id:id},
    })
}
//村镇一体拒绝
export function setexamineczmessage(data) {
    return request({
        url: '/api/villageprogressreviewed/setexamineczmessage',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        params:data,
    })
}
export function uploadzcytzip(data) {
    return request({
        url: '/api/villageprogress/uploadzcytmostzip',
        method: 'post',
        headers: {
            "Content-Type": "multipart/form-data"
        },
        data: data,
        transformRequest: [function (formDatas) {
            return formDatas;
        }],
        // onUploadProgress(progressEvent){
        //     if(progressEvent.lengthComputable){
        //         let val = (progressEvent.loaded/progressEvent.total*100).toFixed(0);
        //         var progress = parseInt(val);
        //         callback(progress)
        //     }
        // }
    })
  }
  //查询年度工作总结
export function getreportlist(listquery) {
    return request({
        url: '/api/yearsummary/getlist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
//上传工作总结
export function uploadreport(data) {
    return request({
        url: '/api/yearsummary/upload',
        method: 'post',
        headers: {
            "Content-Type": "multipart/form-data"
        },
        data: data,
        transformRequest: [function (formDatas) {
            return formDatas;
        }],
        // onUploadProgress(progressEvent){
        //     if(progressEvent.lengthComputable){
        //         let val = (progressEvent.loaded/progressEvent.total*100).toFixed(0);
        //         var progress = parseInt(val);
        //         callback(progress)
        //     }
        // }
    })
  }
